package cn.rongdao.jrkabao.ui.IdentificationVerificate.uicomponent;

import android.content.Context;
import android.util.AttributeSet;
import android.widget.ImageView;
import android.widget.RelativeLayout;
import android.widget.TextView;

import com.mifengkong.frtools.util.FRImageLoad;

import cn.rongdao.jrkabao.R;


/**
 * Created by jiangyongxing on 2017/9/19.
 * 描述：
 */

public class ValidationItemCenterViewUIComponent extends RelativeLayout {

    private TextView mTvTitle;
    private TextView mTvDesc;
    private ImageView mIvIcon;

    public ValidationItemCenterViewUIComponent(Context context) {
        super(context);
    }

    public ValidationItemCenterViewUIComponent(Context context, AttributeSet attrs) {
        super(context, attrs);
    }

    public ValidationItemCenterViewUIComponent(Context context, AttributeSet attrs, int defStyleAttr) {
        super(context, attrs, defStyleAttr);
    }

    @Override
    protected void onFinishInflate() {
        super.onFinishInflate();
        mIvIcon = (ImageView) findViewById(R.id.lvicv_icon);
        mTvDesc = (TextView) findViewById(R.id.lvicv_desc);
        mTvTitle = (TextView) findViewById(R.id.lvicv_title);
    }

    public void setContent(int drawable, String title, String desc) {
        FRImageLoad.loadImage(drawable, mIvIcon);
        mTvTitle.setText(title);
        mTvDesc.setText(desc);
    }

}
